﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using DAO.Model;
using System.Data.Entity.ModelConfiguration.Conventions;
namespace DAO
{
    public class barCafeContext : DbContext
    {
        public barCafeContext()
            : base("BarCafe")
        {
        }

        public DbSet<Bebida> Bebidas {get; set;}
        public DbSet<Cliente> Clientes { get; set; }
        public DbSet<Caja> Cajas { get; set; }
        public DbSet<Comanda> Comandas { get; set; }
        public DbSet<Comanda_Detalle> Detalles { get; set; }
        public DbSet<Estado> Estados { get; set; }
        public DbSet<Factura> Facturas { get; set; }      
        //public DbSet<Menues> Menues { get; set; }
        //public DbSet<Menu_Precargado> Menus_Precargados { get; set; }
        public DbSet<Mesa> Mesas { get; set; }
        public DbSet<Plato> Platos { get; set; }
        public DbSet<Reserva> Reservas { get; set; }
        public DbSet<Rol> Roles { get; set; }
        public DbSet<Sector> Sectores { get; set; }
        public DbSet<TipoDoc> Tipos_Doc { get; set; }
        public DbSet<Usuario> Usuarios { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); 
        }
     }
}
